home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Telnet 2.7b5 / source / main / keypadmenus.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-19  |  1.3 KB  |  52 lines  |  [TEXT/CWIE]

  1. #include "VSkeys.h"                        /* Baylor - for keypad menu support */
  2. #include "wind.h"
  3. #include "vsdata.h"
  4.  
  5. #include "vsinterf.proto.h"
  6. #include "keypadmenus.proto.h"
  7.  
  8. extern WindRec
  9.     *screens;
  10. extern    short    scrn;
  11.  
  12. static    unsigned char KeypadMenuMap[] = {                /* Baylor - which menu items map to which key */
  13. /*     no zero item */
  14.     0,
  15. /*    find,    insert,    remove,    select,    prev,    next,    */
  16.     VSHELP,    VSHOME, VSPGUP,    VSDEL,    VSEND,    VSPGDN,
  17. /*    up,        left,    down,    right,    */
  18.     VSUP,    VSLT,    VSDN,    VSRT,
  19. /*    pf1,    pf2,    pf3,    pf4        */
  20.     VSF1,    VSF2,    VSF3,    VSF4,
  21. /*    kp7,    kp8,    kp9,    minus,    */
  22.     VSK7,    VSK8,    VSK9,    VSKM,
  23. /*    kp4,    kp5,    kp6,    comma,    */
  24.     VSK4,    VSK5,    VSK6,    VSKC,
  25. /*    kp1,    kp2,    kp3,    enter,    */
  26.     VSK1,    VSK2,    VSK3,    VSKE,
  27. /*    kp0,    period */
  28.     VSK0,    VSKP
  29. };
  30.  
  31. static    unsigned char FuncKeyMenuMap[] = {                /* Baylor - which menu items map to which key */
  32. /*     no zero item */
  33.     0,
  34. /*    f6,        f7,        f8,        f9,        f10,    */
  35.     VSF6,    VSF7,    VSF8,    VSF9,    VSF10,
  36. /*    f11,    f12,    f13,    f14,    */
  37.     VSF11,    VSF12,    VSF13,    VSF14,
  38. /*    help,    do    */
  39.     VSF15,    VSF16,
  40. /*    f17,    f18,    f19,    f20        */
  41.     VSF17,    VSF18,    VSF19,    VSF20
  42. };
  43.  
  44. void    KeyMenu(short theItem)
  45. {
  46.     VSkbsend(screens[scrn].vs, KeypadMenuMap[theItem], screens[scrn].echo);        /* Baylor */
  47. }
  48.  
  49. void    FuncMenu(short theItem)
  50. {
  51.     VSkbsend(screens[scrn].vs, FuncKeyMenuMap[theItem], screens[scrn].echo);    /* Baylor */
  52. }